package demo3;


/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-03-21
 * Time: 19:32
 */
interface IShape {//接口
    int age0 = 1;
//    public int age1= 1;
//    public static int age2= 1;
//    public static final int age3 = 1;
    void draw0();
//    public abstract void draw1();
//    public  void draw2();
//    public static void draw3(){
//        System.out.println("static 可以实现");
//    }
//    default public void draw4(){
//        System.out.println("default 可以实现");
//    }

}
class Cycle implements IShape {
    @Override
    public void draw0() {
        System.out.println("⚪");
    }

//    @Override
//    public void draw1() {
//
//    }
//
//    @Override
//    public void draw2() {
//
//    }
//
//    @Override
//    public void draw4() {
//        System.out.println("default 可重写也可不重写");
//    }
}
class Rect implements IShape{
    @Override
    public void draw0() {
        System.out.println("矩形");
    }
}
public class Test {
    public static void drawMAap(IShape shape) {
        shape.draw0();
    }
    public static void main(String[] args) {
        //IShape iShape = new IShape() ;error
        IShape iShape = new Cycle();
        IShape iShape1 = new Rect();
        drawMAap(iShape);
        drawMAap(iShape1);
    }
}
